﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Xml;

/// <summary>
/// Summary description for dbUser
/// </summary>
public class dbUser
{
    public bool XuLyDangNhap(User user,string xml)
    {
        XmlDocument xmlDoc = new XmlDocument();
        xmlDoc.Load(xml);
        XmlNode root = xmlDoc.DocumentElement;
        XmlElement getuser = (XmlElement)root.SelectSingleNode("User[Username='"+ user.Username +"']");
        XmlElement getpass = (XmlElement)root.SelectSingleNode("User[Password='" + user.Password + "']");
        if (getuser == null && getpass ==  null)
        {
            return false;
        }
        else
        {
            return true;
        }
    }
}